﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<OptimumInfra.Models.Customer>" %>

<asp:Content ID="registerTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Account
</asp:Content>

<asp:Content ID="registerContent" ContentPlaceHolderID="MainContent" runat="server">

 <% if(TempData["info"] !=null) { %>
    <p style="text-align: center; color: Red;"><%=TempData["info"] %></p>
    <% } %>
        <% using (Html.BeginForm("Edit", "Account", FormMethod.Post, new {id="customerEdit", name="customerEdit"})) { %>

        <%: Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.")%>
                <legend>Customer Information</legend>
                <br/ />
          <table width="700" style="margin-top: 10px;">

          <tr>
          <td>          
                <div class="editor-label">
                    <%: Html.LabelFor(customer => customer.UserName)%>
                </div>
            </td> 
            <td>
                <div class="editor-field">
                    <%=Model.UserName%>
                </div>
           </td> 
          </tr>
          <tr>
          <td>          
                <div class="editor-label">
                   Password
                </div>
            </td> 
            <td>
                <div class="editor-field">
                    <%=Html.ActionLink("Change Password", "ChangePassword") %>
                </div>
           </td> 
          </tr>
          <tr>
          <td>          
                <div class="editor-label">
                    <%: Html.LabelFor(customer => customer.Email)%>
                </div>
            </td> 
            <td>
                <div class="editor-field">
                    <%: Html.TextBoxFor(customer => customer.Email)%>
                    <%: Html.ValidationMessageFor(customer => customer.Email)%>
                </div>
           </td> 
          </tr>
          
           <tr>
               <td>
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.PhoneNumber)%>
                </div>
                </td> 
                <td>
                <div class="editor-field">
                   <%: Html.TextBoxFor(m => m.PhoneNumber)%>
                    <%: Html.ValidationMessageFor(template => template.PhoneNumber)%>
                </div>
                </td> 
            </tr>   
           <tr>
               <td>
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.Address)%>
                </div>
                </td> 
                <td>
                <div class="editor-field">
                   <%: Html.TextBoxFor(template => template.Address)%>
                    <%: Html.ValidationMessageFor(template => template.Address)%>
                </div>
                </td> 
            </tr>   
     
            <tr>
               <td colspan="2">
                <p>
                    <input type="submit" value="Update" />
                </p>
                </td>
            </tr>         
                
            </table>
    <% } %>
</asp:Content>
